Automated kick and loss detection

ABSTRACT

A method for monitoring and controlling a mud flow system in a drilling rig includes measuring an active mud volume in an active mud pit and an inactive mud volume in an inactive mud pit, modeling a modeled active mud volume in the active mud pit, determining a mud volume balance by calculating a difference between the measurement of the active mud volume and the modeled active mud volume, detecting a transfer of mud from the inactive mud pit to the active mud pit based on a combination of a change in the measurement of the inactive mud volume in the inactive mud pit and a change in the mud volume balance, and detecting downhole gains and losses automatically based on the mud volume balance.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent Applicationhaving Ser. No. 62/929,064, which was filed on Oct. 31, 2019 and isincorporated herein by reference in its entirety.

BACKGROUND

Downhole fluid gain and loss detection provides data related to thesafety and integrity of drilling activities. One way such detection isaccomplished is by monitoring flow and using flow models to deduce thedownhole gain and loss status. However, such monitoring and modeling canbe expensive to implement, as it may rely on measurements that are notreadily available. Other ways to monitor fluid gain and loss rely onpit-volume measurements (i.e., mud volume/level in an active mud pit) orflow paddle measurements. While pit-volume methods are generally easierto deploy, they may provide less efficient and less reliable kickdetection capabilities. In particular, there may be a relatively longdelay between a downhole mud gain/loss event and a responsive change inpit mud level. Such delays occur in part because surface equipment actsas a buffer between the pit and the well, slowing pulses in mud flowthat eventually change the pit mud level.

Furthermore, pit-volume monitoring may be relatively inflexible. Forexample, a pump stop may be fingerprinted and used as a baselinereference to infer whether subsequently observed active pit mud volumevariations are normal. If the flow conditions in subsequent time periodsdiffer from those present in the comparison sample, no reliableconclusion on the gain and loss status can be drawn from mud volumevariations. Further, this technique relies on the periods of interestactually reflecting normal operation; if a period of abnormal operationis considered as the baseline or normal operation, then subsequentabnormalities may be missed or normal activity may be incorrectlylabeled as abnormal.

Additionally, pit-volume monitoring techniques may interpret normalsurface events such as transfers between pits as a downhole gain orloss, resulting in a false determination of a downhole event (e.g., afalse kick alarm). To account for such surface events, current practicecalls for operators on the rig site to record real-time comments on mudlogging reports when they become aware, e.g., of a transfer, afterdiscussion with the mud engineers. Thus, upon confirming that a transferto the active system occurred, the operator can deactivate the gainalarm. However, this practice relies on human users to make observationsand manually enter error-free information into a log in a timely manner.Moreover, the reaction of the operator may take time, as the operatorsmay be responsible for multiple other tasks concurrently, leading todelays and thus potentially long false kick alarm periods.

SUMMARY

This summary is provided to introduce a selection of concepts that arefurther described below in the detailed description. This summary is notintended to identify key or essential features of the claimed subjectmatter, nor is it intended to be used as an aid in limiting the scope ofthe claimed subject matter.

Embodiments of the disclosure provide a method for monitoring andcontrolling a mud flow system in a drilling rig that includes measuringan active mud volume in an active mud pit and an inactive mud volume inan inactive mud pit, modeling a modeled active mud volume in the activemud pit, determining a mud volume balance by calculating a differencebetween the measurement of the active mud volume and the modeled activemud volume, detecting a transfer of mud from the inactive mud pit to theactive mud pit based on a combination of a change in the measurement ofthe inactive mud volume in the inactive mud pit and a change in the mudvolume balance, and detecting downhole gains and losses automaticallybased on the mud volume balance.

Embodiments of the disclosure also provide a computing system includingone or more processors and a memory system including one or morenon-transitory computer-readable media storing instructions that, whenexecuted by at least one of the one or more processors, cause thecomputing system to perform operations. The operations include measuringan active mud volume in an active mud pit and an inactive mud volume inan inactive mud pit, modeling a modeled active mud volume in the activemud pit, determining a mud volume balance by calculating a differencebetween the measurement of the active mud volume and the modeled activemud volume, detecting a transfer of mud from the inactive mud pit to theactive mud pit based on a combination of a change in the measurement ofthe inactive mud volume in the inactive mud pit and a change in the mudvolume balance, and detecting downhole gains and losses automaticallybased on the mud volume balance.

Embodiments of the disclosure further provide a non-transitorycomputer-readable medium storing instructions that, when executed by atleast one processor of a computing system, cause the computing system toperform operations. The operations include measuring an active mudvolume in an active mud pit and an inactive mud volume in an inactivemud pit, modeling a modeled active mud volume in the active mud pit,determining a mud volume balance by calculating a difference between themeasurement of the active mud volume and the modeled active mud volume,detecting a transfer of mud from the inactive mud pit to the active mudpit based on a combination of a change in the measurement of theinactive mud volume in the inactive mud pit and a change in the mudvolume balance, and detecting downhole gains and losses automaticallybased on the mud volume balance.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is best understood from the following detaileddescription when read with the accompanying Figures. It is emphasizedthat, in accordance with the standard practice in the industry, variousfeatures are not drawn to scale. In fact, the dimensions of the variousfeatures may be arbitrarily increased or reduced for clarity ofdiscussion.

FIG. 1 illustrates a schematic view of an example of a drilling system,according to an embodiment.

FIG. 2 illustrates a control block diagram for a mud system of thedrilling system, according to an embodiment.

FIG. 3 illustrates a conceptual view of the mud system, according to anembodiment.

FIG. 4 illustrates a flowchart of a process for modeling mud flow in themud system, according to an embodiment.

FIG. 5 illustrates plots of flow rate and active volume (based on mudvolume in an active pit), according to an embodiment.

FIG. 6 illustrates a conceptual view of an embodiment of the mud systemthat includes a downlinker.

FIG. 7 illustrates plots of inactive mud volume, flow, active mudvolume, and mud volume balance as a function of time, according to anembodiment.

FIG. 8 illustrates a flowchart of a process for detecting and accountingfor mud transfers, according to an embodiment.

FIG. 9 illustrates a flowchart of a method for controlling a mud system,according to an embodiment.

FIG. 10 illustrates plots of measured and theoretical(calculated/modeled) active mud volume, and real-time and adjusted mudvolume balances, according to an embodiment.

FIG. 11 illustrates a schematic view of a computing system, according toan embodiment.

DETAILED DESCRIPTION

Illustrative examples of the subject matter claimed below will now bedisclosed. In the interest of clarity, not all features of an actualimplementation are described in this specification. It will beappreciated that in the development of any such actual implementation,numerous implementation-specific decisions may be made to achieve thedevelopers' specific goals, such as compliance with system-related andbusiness-related constraints, which will vary from one implementation toanother. Moreover, it will be appreciated that such a developmenteffort, even if complex and time-consuming, would be a routineundertaking for those of ordinary skill in the art having the benefit ofthis disclosure.

Further, as used herein, the article “a” is intended to have itsordinary meaning in the patent arts, namely “one or more.” Herein, theterm “about” when applied to a value generally means within thetolerance range of the equipment used to produce the value, or in someexamples, means plus or minus 10%, or plus or minus 5%, or plus or minus1%, unless otherwise expressly specified. Further, herein the term“substantially” as used herein means a majority, or almost all, or all,or an amount with a range of about 51% to about 100%, for example.Moreover, examples herein are intended to be illustrative only and arepresented for discussion purposes and not by way of limitation. Any useof the term “or” is meant to be non-exclusive, e.g., “A or B” means A,B, or both A and B.

FIG. 1 illustrates a schematic view of an example of a drilling system100, according to an embodiment. The drilling system 100 may be providedat a wellsite which may be an onshore or offshore wellsite, and thedrilling system 100 may include any combination of the various elementsdescribed herein.

The drilling system 100 may form a borehole 11 in a subsurface formationby rotary drilling with a drill string 12 suspended within the borehole11. The drilling system 100 may include a platform and derrick assembly10 positioned over the borehole 11. The platform and derrick assembly 10may include drilling equipment, such as a rotary table 16, a kelly 17, ahook 18, and/or a rotary swivel 19. The drill string 12 may be rotatedby the rotary table 16, which engages the kelly 17 at the upper end ofthe drill string 12. The drill string 12 may be suspended from the hook18, attached to a traveling block, through the kelly 17 and the rotaryswivel 19, which permits rotation of the drill string 12 relative to thehook 18. In another embodiment, a top drive system may be utilizedinstead of the rotary table 16 and/or the kelly 17 to rotate the drillstring 12 from the surface above the borehole 11. The drill string 12may be assembled from a plurality of segments 125 that may be or includepipe and/or collars.

The drilling system 100 may also include a BHA 120 connected to a lowerend of the drill string 12. The BHA 120 may include alogging-while-drilling (hereinafter “LWD”) tool 130, ameasuring-while-drilling (hereinafter “MWD”) tool 140, a motor 150, adrill bit 122, or a combination thereof. The drilling system 100 mayfurther include drilling fluid or “mud” 26 stored in an active pit 27Aformed at the wellsite. It will be appreciated that a pit can be astructure that is dug into the ground and, e.g., lined as appropriate toprevent leakage. In other embodiments, a pit can be a separatecontainment structure, such as a tank or other vessel.

A pump 29 of the drilling system 100 may deliver the mud 26 from theactive pit 27A to an interior of the drill string 12 extending into theborehole 11 via a port in the rotary swivel 19, which may cause the mud26 to flow downwardly through the drill string 12 and the BHA 120, asindicated by the arrow 8. The mud 26 may exit via ports in the drill bit122, and then circulate upwardly through an annulus between an outsideof the drill string 12 and a wall of the borehole 11, as indicated byarrows 9. The mud 26 may lubricate the drill bit 122 and/or may carryformation cuttings up to the surface adjacent to the borehole 11. Themud 26 may by returned to the active pit 27A for cleaning andrecirculation.

The drilling system 100 may also include one or more inactive pits 27B.The inactive pits 27B may contain a reserve of the mud 26, which may besupplied (“transferred”) to the active pits 27A periodically, on demand,etc. For example, formation permeability, surface losses, and/ordownhole events may slowly reduce the amount of mud 26 in the active pit27A, and thus mud 26 from the inactive pit 27B may be supplied to theactive pit 27A (e.g., via one or more transfer pumps) to resupply theactive pit 27A. Further, in some situations, the composition of the mud26 may be modified by transferring mud 26 from the inactive pit 27B tothe active pit 27A.

The drilling system 100 may include one or more shakers 155. The shakers155 may receive the mud that has been circulated up from the borehole11, and may remove large cuttings therefrom. The shakers 155 may alsoremove a portion of the drilling mud 26 as well, e.g., as a film on thecuttings. From the shakers 155, the mud 26 may return to the active pit27A, or may be otherwise conditioned and prepared for recirculationthrough the borehole 11.

In some embodiments, the drilling system 100 may also include adownlinker 160. The downlinker 160 may form a part of a flowpath thatbypasses the borehole 11 and the drill string 12, and returns thedrilling mud from the pump 29 directly back to the active pit 27A. Thedownlinker 160 may be employed for bi-directional communications withvarious aspects of the BHA 120.

Turning now to the processing methods and control over at least aportion of the drilling system 100, particularly the mud systemsthereof, embodiments of the present disclosure may combine twotechniques for mud-flow monitoring and control. In particular,embodiments may model the mud flow through the surface equipment andautomatically identify and track mud transfers between pits.

Modeling the surface equipment facilitates making predictions thataccount for transient mud volumes. Transient mud volumes may be observedwhen mud flow changes, such as during connections (e.g., because thepumps are stopped and started). The model may employ an on-the-flyrecalibration strategy that allows the model to adapt to changing mudproperties. This recalibration is controlled to avoid training the modelwith abnormal conditions data. The process of automatic recalibrationworks in parallel with the process of using the model to detect mudvolume balance anomalies in real-time. This prediction is then comparedto the measured volume to determine a mud volume balance, from which muggains or losses may be determined.

Automatically detecting mud transfers between pits may proceed bymonitoring the inactive mud pits and applying a segmentation algorithmto identify periods of change in the mud levels measured therein.Changes in the trend of mud volume in the inactive pits may beidentified and may be correlated to a transfer to or from the activepit, based on the variations of the mud volume balance. The measuredactive volume may be automatically adjusted in real-time in response toa detected transfer between the inactive and active pits. As the term isused here, “real-time” refers to something occurring without a delaythat is easily perceived by a human user, with the goal being for“real-time” to be without any appreciable delay.

FIG. 2 illustrates a control block diagram for a mud control system 200,according to an embodiment. The mud control system 200 may beimplemented using one or more computing devices of a computing system,which may be local to (e.g., a physical component of) the drillingsystem 100, or located remotely therefrom and communicative therewithvia an interne connection, for example.

As indicated at 202, the mud control system 200 may take, e.g., inreal-time, mud measurements in the drilling system 100, particularly inthe active and inactive mud pits and the pump, as discussed above withreference to FIG. 1 . In particular, the volume of mud in the pits maybe measured as a function of time. These measurements may be employed toefficiently control the physical mud system (i.e., the mud-handlingcomponents of the drilling system 100). For example, the measurementsmay be provided to a transient flow modeling module 204. The transientflow modeling module 204 may model mud flow (including losses) during atransient stage of flow in the drilling system 100, e.g., when the pumpis first turned on or after it is turned off.

The output of the transient flow modeling module 204 may be provided toa mud volume balance module 206 and employed to calculate a mud volumebalance. The mud volume balance may be an output of a model configuredto model mud flow in the mud system, and thereby predict the fluidlevels in the active pit. In particular, the mud volume balance is thedifference between the measured volume of mud in the active pit and thevolume of the mud that is predicted by the model to be in the active pitat the same time. The active pit may be a convenient place to projectmud volume, because the volume of the mud in the active pit (and in theinactive pits, as will be discussed below) may be readily measured,thereby providing a calibration measurement for a model upon which themud volume balance module 206 operates. The model may take intoconsideration the various components of the mud flow system, gains andlosses in fluid therefrom, time delays, etc., and project an expectedamount of mud in the active mud pits.

Referring now to FIG. 3 , there is shown a conceptual view of a mudsystem 300 of the drilling system 100, according to an embodiment. Thisview of the mud system 300 will be referred to for a furtherunderstanding of the operation of the transient flow modeling module 204and the mud volume balance module 206, as part of the mud control system200 of FIG. 2 .

When the mud leaves a well 302, it includes drill cuttings suspendedtherein. The mud flows through a flowline 304 (e.g., a pipe) and arrivesat shakers 306. The shakers 306 provide screens that filter the mud,such that cuttings 307 are separated from the mud slurry and the“cleaned” mud is returned to one or more active pits 308. The mud isthen pumped out of the active pit 308 and back to the well 302,beginning a new cycle. At the shakers 306, some mud 309 is also removedor “lost” with the cuttings 307, e.g., as a mud film around the cuttings307.

The mud volume in the active pits 308 may spike (up or down) at pumpstop and start, e.g., because of a buffering effect in surface equipment(e.g., at the shakers 306). This behavior can be theoreticallyreproduced by modeling the shakers 306 as a permeable media.

During steady-state pump flow, the mud volume in the active pits 308decreases due to the cuttings and mud losses at the shakers 306. Thecuttings loss can be deduced from the cuttings flow, which can bemeasured at the outlet of the shakers 306. However, the mud lossassociated with a given amount of cuttings flow may be variable based onseveral factors, and thus may be calibrated.

Thus, to compute a theoretical mud volume in the active pits 308 at agiven point in time, losses during transient flow periods andsteady-state flow periods may be modeled. To do so, two coefficients maybe estimated: a surface loss coefficient β (e.g., from the shaker 306)and a permeability coefficient k (representing the subterraneanformation through which the well 304 extends). For example, thepermeability coefficient k predominately influences the mud volume inthe active pit 308 during transient flow periods, e.g., pump start upand pump stop. On the other hand, the surface loss coefficient βinfluences the mud volume in the active pit 308 during periods ofsteady-state flow.

Accordingly, the calibration strategy may likewise be separated into twophases. Referring now to FIG. 4 , there is shown a flowchart of acalibration process 400, according to an embodiment. The process 400 mayinclude calculating a permeability coefficient during a transient periodof mud flow, as at 402. Specifically, the permeability coefficient k maybe calibrated during the transient period. Pump start may be selected toprovide the transient period. Although pump stoppage may also provide atransient flow period, and thus some embodiments may use pump stoppageas the transient flow period, there may be a higher risk for abnormalactivity (e.g., a kick) during pump stoppage.

For the second stage of calibration, as at 404, a steady-state flowperiod may be selected to calibrate the surface loss coefficient β. Thesteady-state flow period may be experienced after pump start (e.g.,after a duration during which mud begins to flow) and before pumpstoppage. For purposes of calibration, a first steady-state flow periodmay be selected, i.e., between the first pump start and the first pumpstoppage, because it may carry the lowest risk for abnormal activitiesthat impact mud flow; however, in other embodiments, other periods ofsteady-state flow may be selected. Accordingly, in at least somesituations, the surface loss coefficient β may not be recalibratedduring a second steady-state flow period (e.g., after the second pumpstart and before the second pump stoppage).

The mud flow in the mud system 300 may then be modeled based at least inpart on the calculated surface mud loss coefficient β and thepermeability coefficient k, as at 406. For example, to calculate thesecoefficients and, thus produce an accurate model of mud flow, themodules 204, 206 may begin by considering a mass conservation equationin the shaker 306.

The volumetric flow rate of cleaned mud flowing out the shakers 306 canbe expressed using Darcy's law. That is, the shakers 306 may be behaveanalogously to a porous media with a given permeability, area, andthickness. The height of the cleaned mud accumulating over the shakerscreens is expressed as Δh.

As a first approximation, flowline effects may be ignored. For example,the flowline is assumed mainly to create a delay in mud flow due to thewave propagation. Some dampening effects may also occur, but theirinfluence may be included in the porosity modeling of the shakerscreens. Dampening and porosity effects can be approximated by a firstorder system. Thus, the flow rates at the exit of the flowline can beapproximated. Another approximation is that the mud density has smallvariations over each section.

The mass conservation equation in the active pits may then bedetermined. The mud at the exit of the well is a two-phase medium, withthe cleaned mud and the drilled cuttings, which may permit determinationof a density of the mud as a function of time. Further, the cuttings maybe considered to have a generally constant density, and thus theremaining unknown is the density of the cleaned mud, which may berelated to a difference between the density of the mud and the densityof the removed cuttings.

The mud shaker volume generally is not measured, but its calculation isintermediary data useful for the final computation of the active volume.Although the computed shaker volume may not be compared against actualmeasurements for validation, some physical conditions can be used tocontrol its computation. For example, its global behavior fits with afirst order system.

The shaker volume in a pump start is easier to solve from a physicalpoint of view, compared to the pump stop. If the time between theprevious pump stop and the pump start is large enough, the shaker volumemay be considered close to zero at the beginning of the pump start,since the mud above the shaker may have drained through the shakerscreens while the pumps were off. Thus, in practice, the initialconditions for the shaker may be known for a pump start, e.g., theshaker volume is at rest.

The computed shaker volume at the end of a pump stop may not reach zero,but trends towards zero. Specifically, the computed shaker volumefollows a first order response which asymptotically approaches a steadystate value (zero for a pump stop). Thus, at the beginning of the nextpump start, the initial computed shaker volume is not zero (butapproaches zero), even if the time between the last pump stop and thepump start is long enough (depending on the time constant τ).

Further, this first order model can introduce error accumulation inother times, as well. Accordingly, the process 400 may includedetermining when to recalibrate either or both coefficients, as at 408.The computation of the active volume is based on an iterative method.Thus, to reduce the error propagation, recalibration or adjustment ofthe global shaker constant K may be performed during each pump start,and the shaker volume may be reset to zero at the beginning of everypump start if the pump off is long enough. If the permeabilitycoefficient k is calibrated once, the theoretical mud volume in theactive pit drifts away from the measured volume because of the firstorder assumption.

FIG. 5 illustrates plots of active volume (i.e., mud volume in an activepit) and flow rate in a mud system, both as a function of time,according to an embodiment. In this illustration, there are threetransient flow calibration periods brought on by pump start up. Thesesections are labeled as sections 501, 502, 503, and represent transientflow regimes in the mud system. The permeability coefficient k can becalibrated during each section 501-503. By contrast, during normalconditions, the surface loss coefficient β may not change, as it islinked to mud losses in the surface equipment and along with thefiltered cuttings, as mentioned above. Over the period of calibration,the permeability coefficient k may be computed to ensure fitting betweenthe measured active volume and the computed volume. Moreover, thecalibration of coefficient β may occur after the first calibration ofthe global shaker constant K.

Because the surface loss coefficient β is linked to equipmentconfiguration, it may be constant during normal conditions. However, thesurface loss coefficient β may change when one or more screens of theshaker 306 are blocked, since this reduces the cuttings filtering andincreases the mud buffering above the shakers 306. Further, the surfaceloss coefficient β may change when the cuttings flow changes becausecuttings flow change may induce a modification of the mud coatingconditions. The cuttings flow change can be automatically identified bythe mud volume balance model, and the mud losses coefficientrecalibration automatically triggered without any operator input. Theshaker screen blockage may be difficult to predict, however. As such, anoperator may still be called upon to take preventive actions to cleanthe strainer or recalibrate manually surface loss coefficient β.

FIG. 6 illustrates another embodiment of the mud system 300. In thisembodiment, in addition to the other components discussed above, the mudsystem 300 includes a downlinker 600, e.g., as shown in and discussedabove with reference to FIG. 1 . The provision of a downlinker 600 mayresult in a modified mud volume model. In particular, with inclusion ofthe downlinker 600, the volume of the active pit(s) may be expressed atleast partially as a function of the flowrate diverted by the downlinker600.

Returning to FIG. 2 , the transient flow modeling module 204 is used tocalibrate the mud volume balance module 206, as described above. The mudcontrol system 200 may also include a transfer identification module 208and a transfer compensation module 210, as shown. The measurements takenat 202 may be provided to the transfer compensation module 210 and thetransfer identification module 208, which may modify the mud volumebalance calculated in the module 206.

The transfer identification module 208 may proceed by monitoring the mudvolumes in both the inactive pits and the active pits for changes, e.g.,using a change-point or any suitable segmentation algorithm. Thechange-point algorithm can be set with an appropriate threshold, e.g., 1cubic meter, to eliminate false positives caused by noise. Further,“segments”, e.g., changes in volume, can be considered “significant” ifthe segment length is greater than twice the pit volume noise.

Accordingly, the transfer identification module 208 may be generallypassive, monitoring the levels of the mud in the pits until a decreaseor increase or both are detected, e.g., by reference to the mud volumebalance from module 206. At this point, a determination is made as towhether the decrease or increase is impacting the fluid level in anotherpit, e.g., by checking the mud volumes in the various pits for acorresponding change in fluid level. For example, if a level of mud inone inactive pit decreases, a transfer to another inactive pit may beexpected to result in a corresponding increase in the level of fluid inanother inactive pit, and such transfer may not impact the activesystem. By contrast, a transfer of mud from an inactive pit to an activepit may be marked by a reduction in the mud volume in at least one ofthe inactive pits, an increase in the volume in the active pit, and mayimpact the mud volume in the mud flow system.

The mud volume balance may be used to cross-check the transfer. The mudvolume balance is computed as the difference between the measured activevolume and the theoretical active volume. The mud volume balance iscompensated for transient effects, as discussed above, and has a morestable behavior than the raw measured active volume, e.g., in the activepit. Thus, when a transfer to the active pit occurs during a pump flowchange, it may be difficult to identify solely based on observation ofthe mud volume in the active pit. However, the transfer is much easierto observe on the mud volume balance. As such, the mud balance is usedas a reference for the transfer cross-check.

FIG. 7 illustrates graphs of mud volume in an inactive pit 701, mud flowrate 702 (e.g., by the pump), mud volume in the active pit 703, and themud balance 704 (difference between actual and theoretical mud volume inthe active pit) during a common period of time. As can be seen, the mudvolume in the inactive pit 701 may be relatively stable until a transferevent indicated at 705. The transfer event 705 is represented by ameasured decrease in the volume of the fluid in the inactive pit;however, it may not represent an increase in the mud volume in the mudsystem, unless there is a corresponding and delayed increase in fluidvolume in the active pit.

Moreover, as shown in graph of mud flow rate 702, the mud flow rate 702may not be stable at the time of the transfer event 705. In 702, thepump has been shut down and turned on, shut down again, and is in atransient stage at the time the transfer event 705 begins. Thus, as canbe seen in graph 703, a change in fluid level has occurred, but it isunclear whether that was caused by the transient flow in the pump or atransfer of fluid from the inactive pit, and as can be seen earlier intime, the transient flow has caused increases in the fluid level in theactive pit. However, the mud volume balance removes at least some of theeffects of transient flow from the active pit volume. If the mud volumebalance is off by more than a threshold, as indicated by the relativelysharp rise during the transfer event 705, it represents a mud gain eventfor the active pit. Coupled with the decrease in mud volume in theinactive pit, it may be inferred that a transfer, rather than a downholemud gain event (kick) has occurred. As such, there is a two-factor testto establish the existence of a transfer and distinguish a transfer froma downhole gain/loss event: a change in mud volume in the inactive pit,and an increase in the mud volume balance in the active pit.

The volume of mud in the active pit may then be adjusted to compensatefor the transfer. This is illustrated by the summation in FIG. 2 ,between the transfer compensation module 210 and the mud volume balancemodule 206. The compensation uses the mud volume balance variation.Indeed, the mud volume balance is free of transient effects, e.g., fromthe pump flow changes, from the cuttings withdrawal impact at theshaker, from the surface losses. Thus, variations in the mud balanceduring a transfer may represent the amount of mud transferred from or toanother pit.

FIG. 8 illustrates a flowchart of a process 800 for detecting a transferin a mud system, such as the mud system 300, as part of the operation ofa mud control system, such as the mud control system 200, according toan embodiment. The process 800 may include monitoring the mud volumes inthe inactive pit(s), as at 802. For example, a change point analysis orother segmentation technique may be applied thereto, e.g., in acontinuous manner.

At some point, the monitoring activity at 802 may indicate that there isa change in the mud level in one of the inactive pits (or the inactivepit, if the mud system 300 includes a single inactive pit), as at 804.As discussed above, the change in mud level may be over a threshold,e.g., to account for noise in the measurement. The change in mud levelmay be an increase or a decrease in the level of mud in the inactivepit. As such, the level of mud in the inactive pit is the first triggerfor determining whether a transfer has occurred. If such mud levelchanges in the inactive pit do not precede a change in mud level in theactive pit, then the change in mud level in the active pit may beattributed to a downhole gain/loss event or another event not caused bya transfer.

Once a change in mud level in the inactive pit(s) is identified at 804,the process 800 may proceed to determining whether there is acorresponding change in the mud level in another inactive pit, as at806. For example, in some situations, there may be more than oneinactive pit, and there may be cause to transfer fluid between theseinactive pits, e.g., to change composition, balance levels, etc.Accordingly, if the volume in one inactive pit changes, the process 800checks to see if the mud volume in another inactive pit accounts forthis change, which would maintain the mud outside of the active systemand thus not affect the active mud volume. If another inactive pit mudlevel changes to account for the change in the first mud pit, theprocess 800 proceeds to 808, where the boundaries (baseline level) ofthe inactive pit is changed, and the process 800 returns to monitoringmud levels in the active pit(s) at 802.

If there are no corresponding changes in other inactive pits (or ifthere are no other inactive pits, or if the change in the inactive pitsdoes not fully account for the change in the inactive pit identified at802), the process 800 may proceed to determining if there is acorresponding change in the mud volume of the active pit, as at 810. Asexplained above, this may be evaluated based on the mud volume balance,i.e., comparing a predicted mud volume in the active pit with themeasured value, rather than or in addition to comparing the raw changein volume in the active pit. If there is not a corresponding change inthe level of the active pit detected at 810, there may be some otherevent occurring in the system or in the well, which may be separatelyaddressed.

If there is a corresponding change in the active pit (e.g., as evidencedby the mud volume balance), then a mud transfer from an inactive pit toan active pit is determined to have occurred. Accordingly, a kick alarmmay not be appropriate. As such, if the kick alarm has been activated,it may be deactivated, as at 812, or otherwise not activated. Theprocess 800 may then proceed to changing the boundary of the active pitmud volume 814, so as to bring the modeled mud volume back intoagreement with the measured mud volume (e.g., recalibrating the model sothe mud balance is or is nearly zero).

FIG. 9 illustrates a flowchart of a method 900 for monitoring and/orcontrolling a mud system of a drilling rig, according to an embodiment.The method 900 may include pumping mud in the mud system, as at 902.Further, the method 900 may include modeling mud losses during atransient flow period, as at 904. Transient flow periods may occurimmediately after pump start and pump stop. In an embodiment, mud lossduring transient flow periods may be predominately due to formationpermeability, and such losses may be modeled as discussed above, e.g.,using a permeability coefficient k.

Further, the method 900 may include modeling mud losses duringsteady-state flow periods, as at 906. Mud losses during steady-stateflow periods may be predominately attributed to surface mud losses,e.g., from the shaker, along with the drill cuttings. In someembodiments, the mud losses during stead-state flow periods may bemodeled based on a surface loss coefficient β, as discussed above.

The method 900 may also include monitoring (e.g., continuously orperiodically measuring) mud volume levels in active and inactive pits ofthe mud system, as at 908. Active pits are those pits through which mudis circulated during normal pumping operations. Inactive pits may storereserves of mud, and mud may be transferred from the inactive pits tothe active pits for use in the mud system. As such, fluid is notcontinuously circulated through the inactive pits and into/out of thewell during normal pumping operations.

During the operation of the mud system, and based partially on the mudlosses, and also on other factors such as mud flow rate, surfaceequipment, downlinker operation, etc., the method 900 may includecalculating a mud balance for the active mud pits, as at 910. The mudbalance for the active pits may be a difference between a measured mudvolume in the active pit(s) and a mud volume predicted by the model.

The method 900 may periodically (re)calibrate the model for either orboth of the transient losses and/or the steady-state losses, as at 912.The calibration of these losses is discussed above. In some embodiments,the steady-state losses may be calibrated during a first steady-stateflow period, and then recalibrated when surface or flow conditionschange, e.g., when a shaker screen is blocked. The transient statelosses may be recalibrated after a first pump start, or after each pumpstart, or the like.

The method 900 may also include detecting a mud transfer from aninactive pit to the active pit based on a combination of the mud volumein the inactive pit and the mud balance, as at 914. As discussed above,the detection of a transfer may be a two-part (at least) determination.First, a change in mud volume in one of the inactive pits is detected.If there is no change in the mud volume in the inactive pit, then thereis no transfer to/from an inactive pit, and thus any changes in the mudvolume in the active pit may be attributed to other circumstances, suchas downhole mud gain or loss.

Once a change in mud volume in one of the inactive pits is detected, itis then determined if there is a corresponding change in mud volume inanother inactive pit (indicating no transfer between the inactive pitsand the active pit) or in the mud volume of the active pit. However, asdiscussed above, the mud volume in the active pit may not be static,given that it is circulating into and out of the well, e.g., transientflow conditions can make identification of a change in the active mudpit volume difficult to identify.

Accordingly, the method 900 may base the detection of the mud transferon the mud volume balance deviating by a certain amount, e.g.,corresponding to (or roughly the same as) the change in the mud volumeof the inactive pit. If the deviation of the mud volume balancecorresponds to the change in the mud volume in the inactive pit(s), thenthe method 900 may determine that a transfer, rather than a downholegain/loss event, has occurred, and any kick alarms or the like may bedeactivated (or otherwise not activated). Further, the method 900 mayinclude adjusting the model (e.g., the modeled mud volume in the activepit) to account for the transfer, as at 916. The mud volume balance maythus be prepared to form the basis for a detection of a gain/loss eventdownhole, e.g., by accurately modeling “normal” mud losses in the system(e.g., through the shaker or based on formation permeability) andaccounting for transfers in the mud volume balance, so as to permitdownhole mud loss/gains to be distinguished from normal operation andtransfers.

FIG. 10 illustrates two plots 1000 and 1002 illustrating the operationof the method 900, according to an embodiment. In the first plot 1000,measured active mud volume 1004 (i.e., volume circulating through themud system, e.g., as measured at the active mud pit(s)) is compared withtheoretical (calculated based on a model) active mud volume 1006. In thesecond plot 1002, a real-time mud volume balance (difference betweenmeasured and active mud volume) 1008 and an “adjusted” mud volumebalance 1010, which accounts for transfers, are shown.

As can be seen, the trend for theoretical volume 1006 in the first plot1000 is generally decreasing. The measured mud volume 1004 tracks this,until an event 1020 occurs. The event 1020 leads to the measured mudvolume 1004 sharply increasing over the theoretical volume 1006.Generally, this is indicative of a downhole mud gain (e.g., a kick),which may be a hazardous condition, or a transfer of mud from one ormore inactive pits to the active pit, which is not a hazardouscondition.

The second plot 1002 shows how the detection of the event 1020 affectsthe mud volume balance. As would be expected from the difference betweenthe lines 1004, 1006, the mud volume balance spikes beginning at theevent 1020.

In response to the event 1020, in at least some embodiments, an alarmmay be activated, and at least one task of the method 900 may be todetermine if the alarm is justified (e.g., a kick has occurred/isoccurring) or not. To do this, the method 900 determines if there wasalso a transfer, e.g., by reference to the mud volume balance and theinactive much volume, as discussed above. The transfer determination mayoccur in parallel to the monitoring of the mud volume, or may occur inresponse to an alarm being activated. The transfer determination isdiscussed in detail above. If a transfer is determined, the alarm may bedeactivated.

In another embodiment, an alarm may not be immediately activated inresponse to detection of the event 1020. Rather, a flag or warning maybe set in response to the event 1020, and the method 900 may determinewhether an alarm should be activated. In order to do this, the method900 may check for the occurrence of a transfer, as discussed above. If atransfer occurred, the method 900 refrains from activating the alarm,and otherwise actives the alarm.

If a transfer is determined, the model of mud in the active system maybe updated, which may serve to “revise” the mud balance to take intoaccount the transfer of mud. As can be seen in the second plot 1002, thereal time mud balance 1008 is adjusted such that it is nearly zero,reflecting that the mud model is accurately predicting the active mudvolume, now that the transfer is taken into consideration.

The revision may be prospective from the point of view of the user. Forexample, there may be a delay or buffer in the delivery of the mudmeasurements to the user, such that a transfer may be detected andaccommodated in the model and the mud volume balance revised before theuser receives the measurements. Alternatively, the mud volume balancecan be revised, in a backward-looking fashion, when the mud transfer isdetermined. In either case, an alarm may initially be activated and thendeactivated if a transfer is detected, or it may be decided whether toactivate or refrain from activating such an alarm before it is activatedbased on whether a transfer is detected.

Thus, it will be seen that the present system and methods have severalpractical applications. For example, a kick alarm, which may beinitiated automatically in response to an increase in the mud balanceand/or an increase in the active pit volume, may be quickly andefficiently verified or identified as being false and deactivated. Inparticular, embodiments of the present disclosure may make a robustdetermination, which considers mud losses both at the surface and in thewell, as well as transfers of fluid between the inactive and activepits. This may facilitate the control and operation of the mud system,which is used to circulate mud through the well, e.g., via pumping themud from the active pit into the well and back into the active pit.

In some embodiments, the methods of the present disclosure may beexecuted by a computing system. FIG. 11 illustrates an example of such acomputing system 1100, in accordance with some embodiments. Thecomputing system 1100 may include a computer or computer system 1101A,which may be an individual computer system 1101A or an arrangement ofdistributed computer systems. The computer system 1101A includes one ormore analysis modules 1102 that are configured to perform various tasksaccording to some embodiments, such as one or more methods disclosedherein. To perform these various tasks, the analysis module 1102executes independently, or in coordination with, one or more processors1104, which is (or are) connected to one or more storage media 1106. Theprocessor(s) 1104 is (or are) also connected to a network interface 1107to allow the computer system 1101A to communicate over a data network1109 with one or more additional computer systems and/or computingsystems, such as 1101B, 1101C, and/or 1101D (note that computer systems1101B, 1101C and/or 1101D may or may not share the same architecture ascomputer system 1101A, and may be located in different physicallocations, e.g., computer systems 1101A and 1101B may be located in aprocessing facility, while in communication with one or more computersystems such as 1101C and/or 1101D that are located in one or more datacenters, and/or located in varying countries on different continents).

A processor may include a microprocessor, microcontroller, processormodule or subsystem, programmable integrated circuit, programmable gatearray, or another control or computing device.

The storage media 1106 may be implemented as one or morecomputer-readable or machine-readable storage media. Note that while inthe example embodiment of FIG. 11 storage media 1106 is depicted aswithin computer system 1101A, in some embodiments, storage media 1106may be distributed within and/or across multiple internal and/orexternal enclosures of computing system 1101A and/or additionalcomputing systems. Storage media 1106 may include one or more differentforms of memory including semiconductor memory devices such as dynamicor static random access memories (DRAMs or SRAMs), erasable andprogrammable read-only memories (EPROMs), electrically erasable andprogrammable read-only memories (EEPROMs) and flash memories, magneticdisks such as fixed, floppy and removable disks, other magnetic mediaincluding tape, optical media such as compact disks (CDs) or digitalvideo disks (DVDs), BLURAY® disks, or other types of optical storage, orother types of storage devices. Note that the instructions discussedabove may be provided on one computer-readable or machine-readablestorage medium, or may be provided on multiple computer-readable ormachine-readable storage media distributed in a large system havingpossibly plural nodes. Such computer-readable or machine-readablestorage medium or media is (are) considered to be part of an article (orarticle of manufacture). An article or article of manufacture may referto any manufactured single component or multiple components. The storagemedium or media may be located either in the machine running themachine-readable instructions, or located at a remote site from whichmachine-readable instructions may be downloaded over a network forexecution.

In some embodiments, computing system 1100 contains one or more mudcontrol module(s) 1108. In the example of computing system 1100,computer system 1101A includes the mud control module 1108. In someembodiments, a single mud control module may be used to perform someaspects of one or more embodiments of the methods disclosed herein. Inother embodiments, a plurality of mud control modules may be used toperform some aspects of methods herein.

It should be appreciated that computing system 1100 is merely oneexample of a computing system, and that computing system 1100 may havemore or fewer components than shown, may combine additional componentsnot depicted in the example embodiment of FIG. 11 , and/or computingsystem 1100 may have a different configuration or arrangement of thecomponents depicted in FIG. 11 . The various components shown in FIG. 11may be implemented in hardware, software, or a combination of bothhardware and software, including one or more signal processing and/orapplication specific integrated circuits.

Further, the steps in the processing methods described herein may beimplemented by running one or more functional modules in informationprocessing apparatus such as general purpose processors or applicationspecific chips, such as ASICs, FPGAs, PLDs, or other appropriatedevices. These modules, combinations of these modules, and/or theircombination with general hardware are included within the scope of thepresent disclosure.

Computational interpretations, models, and/or other interpretation aidsmay be refined in an iterative fashion; this concept is applicable tothe methods discussed herein. This may include use of feedback loopsexecuted on an algorithmic basis, such as at a computing device (e.g.,computing system 1100, FIG. 11 ), and/or through manual control by auser who may make determinations regarding whether a given step, action,template, model, or set of curves has become sufficiently accurate forthe evaluation of the subsurface three-dimensional geologic formationunder consideration.

The foregoing description, for purpose of explanation, has beendescribed with reference to specific embodiments. However, theillustrative discussions above are not intended to be exhaustive orlimiting to the precise forms disclosed. Many modifications andvariations are possible in view of the above teachings. Moreover, theorder in which the elements of the methods described herein areillustrate and described may be re-arranged, and/or two or more elementsmay occur simultaneously. The embodiments were chosen and described inorder to best explain the principles of the disclosure and its practicalapplications, to thereby enable others skilled in the art to bestutilize the disclosed embodiments and various embodiments with variousmodifications as are suited to the particular use contemplated.

What is claimed is:
 1. A method for monitoring and controlling a mudflow system in a drilling rig, comprising: measuring an active mudvolume in an active mud pit and an inactive mud volume in an inactivemud pit; modeling a modeled active mud volume in the active mud pit;determining a mud volume balance by calculating a difference between themeasurement of the active mud volume and the modeled active mud volume;detecting a transfer of mud from the inactive mud pit to the active mudpit based on a combination of a change in the measurement of theinactive mud volume in the inactive mud pit and a change in the mudvolume balance; and detecting downhole gains and losses automaticallybased on the mud volume balance.
 2. The method of claim 1, furthercomprising revising the mud volume balance to account for the transfer,in response to detecting the transfer.
 3. The method of claim 1, whereinmodeling the modeled active mud volume comprises: determining apermeability loss coefficient during transient flow periods; anddetermining a surface loss coefficient during steady-state periods,wherein the modeled active mud volume is modeled based on a combinationof the permeability loss coefficient and the surface loss coefficient.4. The method of claim 3, wherein the permeability loss coefficient isrelated to mud flow into or out of a subterranean formation, and whereinsurface loss coefficient is related at least in part to mud flow out ofa shaker of a drilling system.
 5. The method of claim 3, furthercomprising recalibrating the surface loss coefficient during asteady-state flow period after a first pump start and before a firstpump stoppage, wherein the surface loss coefficient is not recalibratedafter the first pump stoppage and before a second pump stoppage.
 6. Themethod of claim 3, further comprising recalibrating the permeabilityloss coefficient during a pump start, before reaching a steady-stateflow period after the pump start.
 7. The method of claim 1, whereindetecting the transfer of mud comprises: determining that the inactivemud volume has changed by more than a threshold amount; and in responseto determining that the inactive mud volume has changed, determiningthat the mud volume balance has changed to compensate for the inactivemud volume changing.
 8. The method of claim 7, wherein detecting thetransfer of mud further comprises determining that a mud volume inanother inactive mud pit has not changed to compensate for the change inthe inactive mud volume, wherein determining that the mud volume balancehas changed to compensate for the inactive mud volume changing is alsoin response to determining that the mud volume in the other inactive mudpit has not changed to compensate.
 9. The method of claim 1, furthercomprising deactivating or refraining from activating a kick alarm inresponse to detecting the transfer of mud.
 10. The method of claim 1,further comprising pumping mud into a well using the mud flow system,wherein the mud is circulated through the active mud pit.
 11. Acomputing system, comprising: one or more processors; and a memorysystem comprising one or more non-transitory computer-readable mediastoring instructions that, when executed by at least one of the one ormore processors, cause the computing system to perform operations, theoperations comprising: measuring an active mud volume in an active mudpit and an inactive mud volume in an inactive mud pit; modeling amodeled active mud volume in the active mud pit; determining a mudvolume balance by calculating a difference between the measurement ofthe active mud volume and the modeled active mud volume; detecting atransfer of mud from the inactive mud pit to the active mud pit based ona combination of a change in the measurement of the inactive mud volumein the inactive mud pit and a change in the mud volume balance; anddetecting downhole gains and losses automatically based on the mudvolume balance.
 12. The computing system of claim 11, wherein theoperations further comprise revising the mud volume balance to accountfor the transfer, in response to detecting the transfer.
 13. Thecomputing system of claim 11, wherein modeling the modeled active mudvolume comprises: determining a permeability loss coefficient duringtransient flow periods; and determining a surface loss coefficientduring steady-state periods, wherein the modeled active mud volume ismodeled based on a combination of the permeability loss coefficient andthe surface loss coefficient.
 14. The computing system of claim 13,wherein the permeability loss coefficient is related to mud flow into orout of a subterranean formation, and wherein surface loss coefficient isrelated at least in part to mud flow out of a shaker of a drillingsystem.
 15. The computing system of claim 13, wherein the operationsfurther comprise recalibrating the surface loss coefficient during asteady-state flow period after a first pump start and before a firstpump stoppage, wherein the surface loss coefficient is not recalibratedafter the first pump stoppage and before a second pump stoppage.
 16. Thecomputing system of claim 13, wherein the operations further compriserecalibrating the permeability loss coefficient during a pump start,before reaching a steady-state flow period after the pump start.
 17. Thecomputing system of claim 11, wherein detecting the transfer of mudcomprises: determining that the inactive mud volume has changed by morethan a threshold amount; and in response to determining that theinactive mud volume has changed, determining that the mud volume balancehas changed to compensate for the inactive mud volume changing.
 18. Thecomputing system of claim 17, wherein detecting the transfer of mudfurther comprises determining that a mud volume in another inactive mudpit has not changed to compensate for the change in the inactive mudvolume, wherein determining that the mud volume balance has changed tocompensate for the inactive mud volume changing is also in response todetermining that the mud volume in the other inactive mud pit has notchanged to compensate.
 19. A computing system, comprising: one or moreprocessors; and a memory system comprising one or more non-transitorycomputer-readable media storing instructions that, when executed by atleast one of the one or more processors, cause the computing system toperform operations, the operations comprising: measuring an active mudvolume in an active mud pit and an inactive mud volume in an inactivemud pit; modeling a modeled active mud volume in the active mud pit;determining a mud volume balance by calculating a difference between themeasurement of the active mud volume and the modeled active mud volume;detecting a transfer of mud from the inactive mud pit to the active mudpit based on a combination of a change in the measurement of theinactive mud volume in the inactive mud pit and a change in the mudvolume balance; and detecting downhole gains and losses automaticallybased on the mud volume balance.
 20. The computing system of claim 19,wherein the operations further comprise revising the mud volume balanceto account for the transfer, in response to detecting the transfer, andwherein modeling the modeled active mud volume comprises: determining apermeability loss coefficient during transient flow periods; anddetermining a surface loss coefficient during steady-state periods,wherein the modeled active mud volume is modeled based on a combinationof the permeability loss coefficient and the surface loss coefficient.